﻿namespace FlowControl
{
    class FlowLoadLuaBundle : FlowBase
    {
        public override void Activate()
        {
            base.Activate();
            ZEventCenter.AddEventListener(ConstData.LOAD_LUA_COMPLETE, OnComplete);
            BehaviourUtil.StartCoroutine(ConfigAssetMgr.GetSingleton().RunLoadLua());
        }

        private void OnComplete(ZEvent ev)
        {
            ZEventCenter.RemoveEventListener(ConstData.LOAD_LUA_COMPLETE, OnComplete);
            IsComplete = true; LuaMgr.GetSingleton().RunLoadLua();
        }
    }
}